package com.fhszframe.modules;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @Author 柠檬  <xuguangsheng@lianhyd.com>
 * @Date 2018/8/10 13:59
 * @update
 */
@RestController
public class DemoController {

    @Value("${blog.address}")
    String address;

    @Value("${blog.author}")
    String author;

    @Value("${blog.desc}")
    String desc;
    private static Logger logger = LogManager.getLogger(DemoController.class);
    @RequestMapping(value ="/demo",method = RequestMethod.GET)
    public String demo(){
        return desc;
    }
    @RequestMapping(value ="")
    public String demo2(){
        logger.error("log4j2----------------\n");
        return desc;
    }
}
